<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">

   <head th:replace = "common/headerV3.5::header" />
   <div th:replace = "common/headerV3.5::body" ></div>
   
<body>
	
	<div class="page-loading">
	    <div class="ball-loader">
	        <span></span><span></span><span></span><span></span>
	    </div>
	</div>
	
	 <div class="layui-body-header">
	    <span class="layui-body-header-title">${vo.describe}</span>
	</div>
	
	<div class="layui-fluid">
	    <div class="layui-row layui-col-space15">
	        <div class="layui-col-sm12 layui-col-md12 layui-col-lg12">
	            <div class="layui-card">
	                <div class="layui-card-body">
	                    <div class="layui-form toolbar">
	                        <div class="layui-form-item">
	                            <div class="layui-inline">
	                                <input id="roleName" class="layui-input" type="text" placeholder="关键字搜索"/>
	                            </div>
	                            <div class="layui-inline">
	                                <button id="btnSearch"  onclick="search()" class="layui-btn icon-btn layui-btn-sm"><i class="layui-icon">&#xe615;</i>搜索</button>
	                                <button id="btnAdd"  onclick="addForm()"  class="layui-btn icon-btn layui-btn-sm"><i class="layui-icon">&#xe654;</i>添加</button>
	                                <button id="btnExp" onclick="exportData()"  class="layui-btn icon-btn layui-btn-sm "><i class="layui-icon">&#xe67d;</i>导出</button>
	                            </div>
	                        </div>
	                    </div>
	                    <table class="layui-table" id="roleTable" lay-filter="roleTable"></table>
	                </div>
	            </div>
	        </div>
	    </div>
	</div>
 
  	<script type="text/html"  id="tableBar" >
	    <a class="layui-btn layui-btn-primary layui-btn-xs"   lay-event="edit">修改</a>
	    <a class="layui-btn layui-btn-danger layui-btn-xs"   lay-event="delete">删除</a>
	    <a class="layui-btn layui-btn-normal layui-btn-xs"   lay-event="roleAssign">权限配置</a>
	</script>
	
  	<script type="text/javascript">
  		
  		var tableId = "roleTable";
  		var formTitle  = "${vo.describe}" ;
  	 	var getListUrl = ctx + '/${vo.tablename_camelCase}/getList';
   		var toFormUrl  = ctx + '/${vo.tablename_camelCase}/toForm';
   		var deleteUrl  = ctx + '/${vo.tablename_camelCase}/delete/';
   		var columns = [
			    {checkbox: true, align: 'center' },
			 <#if vo.columns?exists>
				<#list vo.columns as item>
				{field: '${item.columnName}',  title: '${item.columnRemark}',  align: 'center'  },
				</#list>
			  </#if>
			  	{align: 'center', toolbar: '#tableBar', title: '操作', minWidth: 200}
			]
		var columnArray = [];
		columnArray.push(columns)
 		
		
		//初始化表格信息
		initTable( tableId , getListUrl , columnArray);
  		
	</script>
</body>
</html>


